var Cesium = require('cesium/Cesium');
require('./css/main.css');
require('cesium/Widgets/widgets.css');
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiY2RhMDMyYi1mODVkLTRkODAtYmI4MS0zZTY0OTM3OGExZWEiLCJpZCI6MjU5LCJpYXQiOjE2MTQ1OTIwNDZ9.0jO0HJaY0N1DrvfxPuuoDPWN_ebN2o2Ku2DrRC_P8qs';
var viewer = new Cesium.Viewer("cesiumContainer", {
    infoBox: false,
    selectionIndicator: false,
    shadows: true,
    shouldAnimate: true
});

var entity;

function getColorBlendMode(colorBlendMode) {
    return Cesium.ColorBlendModel[colorBlendMode.toUpperCase()];
}

function getColor(colorName, alpha) {
    var color = Cesium.Color[colorName.toUpperCase()];
    return Cesium.Color.fromAlpha(color, parseFloat(alpha));
}

var viewModel = {
    color: "Red",
    colors: [],
    alpha: 1.0,
    colorBlendMode: "Highlight",
    colorBlendModes: ["Highlight", "Replace", "Mix"],
    colorBlendAmount: 0.5,
    colorBlendAmountEnabled: false,
    silhouetteColor: "Red",
    silhouetteColors: ["Red", "Green", "Blue", "Yellow", "Gray"],
    silhouetteAlpha: 1.0,
    silhouetteSize: 2.0
};